package pacman.base;

public class Score {
    private static int score = 0;
    private static long time = 0;
    
    public static int getScore() {
    	return (score * 10);
    }

    public static int getFinalScore() {
		int temp;
		temp = getScore() + getTempBonus();
		return temp;
    }

    public static void setScore(int score) {
    	Score.score = score;
    }
    
    public static long getTime() {
    	return time;
    }
    
    public static void setTime(long time) {
    	Score.time = time;
    }

    private static int getTempBonus() {
    	int temporalBonus = 0;
    	if (time == 0)  temporalBonus = 0;
		if (time != 0 && time <= 30) temporalBonus = 10000;
		if (time > 30 && time <= 60) temporalBonus = 1000;
		if (time > 60 && time <= 90)  temporalBonus = 100;
		if (time >= 90) temporalBonus = 10;
		return temporalBonus;
    }
}
